-
Notifications
You must be signed in to change notification settings - Fork 345
Fix pods remaining pending after local volume release until manual intervention #505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Hi @Copilot. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
- Modified discovery logic to handle Released PVs with Delete reclaim policy - When discovery finds a Released PV with Delete policy, it immediately deletes the old PV and creates a new Available PV - This eliminates the delay between volume release and availability for new pod binding - Added comprehensive tests to validate the fix for both Delete and Retain reclaim policies - All existing tests continue to pass The fix ensures volumes become available for new pods immediately after release, solving the issue where pods would remain pending until manual intervention. Co-authored-by: andyzhangx <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Copilot The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
@Copilot: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
This PR fixes an issue where pods would remain pending after a local volume was released until the pending pod was manually deleted and recreated.
Problem
When using local volumes with the local-static-provisioner:
Root Cause
The discovery process in
pkg/discovery/discovery.go
was skipping creation of new PVs when any existing PV was found, regardless of the PV's state. This meant Released PVs (which are not bindable) would prevent new bindable PVs from being created until the async cleanup process completed, creating a timing gap where no bindable PV existed.Solution
Modified the discovery logic to handle Released/Failed PVs intelligently:
This eliminates the timing gap and ensures volumes become available for new pod binding immediately after the previous pod is deleted.
Changes
pkg/discovery/discovery.go
to check PV state and reclaim policyImpact
Fixes #504.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.